/*
** process_char.c for  in /home/georgi_v/rendu/PSU_2013_my_printf
** 
** Made by georgi_v
** Login   <georgi_v@epitech.net>
** 
** Started on  Sun Nov 17 08:19:22 2013 georgi_v
** Last update Fri Dec  6 19:53:44 2013 georgi_v
*/

#include "my.h"

int		process_char(const char *format, va_list ap, int *cnt)
{
  t_list        *opts;
  data_t        *data;
  int           (*p)(va_list);

  opts = init();
  data = get_node_by_char(opts, format[*cnt + 1]);
  if (data != NULL)
    {
      *cnt +=2;
      p = data->conv;
      return (p(ap));
    }
  process_amps(format, cnt);
  return (0);
}
